//
//  YKHospitalLogHeaderView.m
//  YunKang
//
//  Created by leoking870 on 2017/10/1.
//  Copyright © 2017年 leoking870. All rights reserved.
//

#import "YKHospitalLogHeaderView.h"

@interface YKHospitalLogHeaderView ()
@property (weak, nonatomic) IBOutlet UIImageView *hospitalIconImageView;
@property (weak, nonatomic) IBOutlet UILabel *hospitalNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *hospitcalNumberLabel;
@property (weak, nonatomic) IBOutlet UIImageView *hospitalVIPImageView;
@property (weak, nonatomic) IBOutlet UIButton *hospitalTypeButton;
@property (weak, nonatomic) IBOutlet UIButton *hospitalInsuranceTypeButton;

@end



@implementation YKHospitalLogHeaderView


+ (YKHospitalLogHeaderView *)viewFromNib {
    YKHospitalLogHeaderView *aaView = [[[NSBundle mainBundle] loadNibNamed:@"YKHospitalLogHeaderView" owner:nil options:nil] lastObject];
    
    return aaView;
}

- (void)setMYKClientDataDetail:(YKClientDataDetail *)mYKClientDataDetail {
    _mYKClientDataDetail = mYKClientDataDetail;
    self.hospitalNameLabel.text = mYKClientDataDetail.C_NAME;
    [self.hospitalTypeButton setTitle:[NSString stringWithFormat:@"结算类型：%@",mYKClientDataDetail.ST_NAME] forState:UIControlStateNormal];
    if ([mYKClientDataDetail.CS_NAME isEqualToString:@"已认证"]) {
        self.hospitalVIPImageView.hidden = NO;
    }
    else {
        self.hospitalVIPImageView.hidden = YES;
    }
    self.hospitcalNumberLabel.text = mYKClientDataDetail.C_CODE;
    [self.hospitalInsuranceTypeButton setTitle:[NSString stringWithFormat:@"医保资料：%@",mYKClientDataDetail.MEDICAL_NAME] forState:UIControlStateNormal];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
